Switch circuit having excess-current detection function

ABSTRACT

A microcomputer 4 responds to an instruction signal to turn the load L on or off to control the FET 2 through the drive circuit 5. The microcomputer 4 samples an electric current I L  which is supplied through the A/D converter 6 and which flows in the load L at every predetermined sampling time T S  and subjects the sampled electric current I L  to a comparison with a known rated current value I R  for the load L. When I L  ≧I R  is satisfied, the microcomputer 4 starts counting energizing time T. When the accumulated value of I L  ×T S  is enlarged to a predetermined value S O , the microcomputer 4 turns the FET 2 off. When the detected electric current I L  is larger than an upper limit I O  (&gt;I R ) determined previously, the microcomputer 4 immediately turns the FET 2 off through the drive circuit 5.

BACKGROUND OF THE INVENTION

1. Field of the Invention

The present invention relates to a switch circuit having anexcess-current detection function for on/off-control supply of electricpower from a power source to a load.

2. Description of the Related Art

(1) Prevention of a short circuit of an electric circuit which causes afailure of an apparatus and a fire has a critical problem which has beeninvestigated to be solved for a long time. However, various states ofthe short circuits have inhibited a countermeasure capable ofappropriately operating against any state of the short circuits andhaving a simple structure from being realized.

Hitherto, fuses have been most widely employed to protect the equipmentand electrical lines from a short circuit. The fuse is provided with ametal conductor portion and arranged in such a manner that the metalconductor portion is melted when the temperature of the metal conductorportion has been raised to a level higher than a predetermined level. Ingeneral, the fuse is disposed at an intermediate position of theelectric line which must be protected, for example, a power supply lineconnected to a load in such a manner that the fuse is in seriesconnected to the power source. When an excess current flows in the fuseand thus the temperature of the metal conductor portion is raised to alevel higher than the foregoing set level, the metal conductor portionis melted so that supply of electric power through the electric line,which must be protected, is interrupted.

(2) On the other hand, miniaturization of electric products has beenattempted by reducing the size of electronic elements arranged to bemounted on the electric product. For example, a switch circuit has beenemployed in which a switching device for controlling supply of electricpower from the power source to a load and a control circuit forcontrolling the operation of the switching device are integrally mountedon a substrate. As a switch circuit of the foregoing type, there hasbeen employed a circuit having a protective circuit arranged to, inaddition to simple on-off control of the switching device, detectgeneration of abnormality, such as an excess current, excess voltage,overheat and the like, and to control the switching device in responseto detection of the abnormality.

The conventional technique (1) is required to design the above-mentionedset value in consideration of deleting with respect to the environmenttemperatures because the heat accumulation ratio is lowered and meltingtime is elongated when the environment temperature is low because themetal conductor portion has been melted by accumulated heat.

The short circuits include a state in which an excess current flowscontinuously and a state in which pulse-like excess currentsintermittently flow. In the latter case, the heat accumulation ratio isreduced as compared with the former case. Therefore, there arisesapprehension that the melting time is elongated or the fuse cannot bemelted though an excess current is flowing. Thus, devices and electriclines cannot reliably be protected by using the fuse from intermittentpulse-like excess currents.

The switch circuit in the conventional technique (2) is arranged todetect an excess current in such a manner that the switching device isimmediately switched off when an electric current having a levelconsiderably higher than a rated current for the circuit or the load hasflowed so as to self-protect the switch circuit. That is, the foregoingtechnique is not structured to protect the electric line and the loadfrom an excess current having a level somewhat higher than that of therated current set for the electric-line elements between the powersource and the load or that for the load.

SUMMARY OF THE INVENTION

To solve the above-mentioned problems, an object of the presentinvention is to provide a switch circuit having an excess-currentdetection function which is capable of reliably protecting the electriclines and the load.

According to the present invention, there is provided a switch circuithaving an excess-current detection function, including a semiconductorswitching device disposed between a load and a power source and arrangedto turn on or off the connection between the load and the power sourcein accordance with a control signal supplied to a control terminalthereof and switch control means arranged to receive an instructionsignal output from an instruction-signal output portion and to output acontrol signal to the control terminal of the semiconductor switchingdevice so as to control supply of electric power from the power sourceto the load, comprising: electric-current detection means for detectinga load electric current which flows in the load; and excess-currentcontrol means for changing on/off control of the semiconductor switchingdevice when detection of the load electric current satisfies an excesscurrent determining condition previously determined in accordance withthe electric characteristics of the electric line between the load andthe power source or those of the load.

The above-mentioned structure is arranged in such a manner that when theinstruction signal output from the instruction-signal output portion andinstructing the operation of the load is received, the control signal isoutput to the control terminal of the semiconductor switching device inaccordance with the received instruction signal so that the connectionbetween the load and the power source is turned on or off in accordancewith the control signal. When the load electric current flowing in theload is detected and the detected load electric current satisfies theexcess current determining condition determined previously in accordancewith the electric characteristics of the electric line between the loadand the power source or those of the load, on-off control of thesemiconductor switching device is changed. Thus, passage of an excesscurrent larger than the electric characteristics of the electric linebetween the load and the power source or those of the load can beprevented.

The present invention may be structured in such a manner that thesemiconductor switching device, the switch control means and theexcess-current control means are integrally formed on a substrate.

The above-mentioned structure, in which the semiconductor switchingdevice, the switch control means and the excess-current control meansare integrally formed on the substrate, enables the size of the circuitto be reduced and the electric wiring to be simplified.

The present invention may be structured in such a manner that theelectric-current detection means is furthermore integrally formed on thesubstrate.

Since the above-mentioned structure is arranged in such a way that alsothe electric-current detection means is integrally formed on thesubstrate in addition to the semiconductor switching device, the switchcontrol means and the excess-current control means, the size of thecircuit can furthermore be reduced and the electrical wiring can besimplified.

The present invention may be structured in such a manner that theexcess-current control means has comparison means for subjecting thedetected load electric current and a reference electric currentdetermined previously in accordance with the electric characteristics toa comparison and count means for counting energizing time in which anelectric current larger than the reference electric current flows in theload, and the excess current determining condition is determined byusing the load electric current larger than the reference electriccurrent and the energizing time.

The above-mentioned structure is arranged in such a manner that the loadelectric current, which flows in the load, is detected and the detectedload electric current and the reference electric current determinedpreviously in accordance with the electric characteristics of theelectric line or the load are subjected to a comparison. Then, theenergizing time is counted in which an electric current larger than thereference electric current flows is counted. If a load electric currentlarger than the reference electric current and the energizing timesatisfy the excess current determining condition, on-off control of thesemiconductor switching device is changed so as to reliably preventoccurrence of an undesirable fact that the energizing time of the excesscurrent exceeds the electric characteristics of the electric linebetween the load and the power source or those of the load. Thereference electric current may be the rated current for the electricline or the load.

The excess-current control means is arranged to determine an excesscurrent when a condition is satisfied such that a predetermined electriccurrent larger than the reference electric current flows in the load fortime determined previously in accordance with the electriccharacteristics and provided with a plurality of excess currentdetermining conditions obtained by combining different set electriccurrents and set time periods arranged in such a manner that the settime is shortened in inverse proportion to the set electric current, thecomparison means further subjects the detected load electric current andeach of the set electric currents to a comparison, and the count meansfurther counts energizing time in which an electric current larger thaneach of the set electric current flows in the load.

The foregoing structures are arranged in such a manner that the loadelectric current, which flows in the load, is detected, the detectedload electric current, the reference electric current and each setelectric current are subjected to a comparison, and the energizing timeis counted in which an electric current larger than the referenceelectric current and each set electric current flows in the load. Sincethe set time is made to be shorter in inverse proportion to the setelectric current, the larger the electric current, which flows in theload, as compared with the reference electric current, the shorter thetime in which an excess current is determined. Thus, the determinationof the excess current can precisely be performed. Thus, supply ofelectric power by a degree exceeding the electric characteristics of theelectric line or the load can reliably be prevented.

The excess-current control means may have calculating means forobtaining the product of an electric current, which flows in the load ineach predetermined time and which is larger than the reference electriccurrent and the above-mentioned set time so as to accumulate theproducts and determining means for determining an excess current whenthe value of the accumulation is enlarged to a predetermined value. Theforegoing structure enables determination of an excess current to beperformed in short energizing time if the level of the load electriccurrent is low and determination of an excess current to be performed inlong energizing time if the level of the load electric current is low.As a result, the determination of the excess current can precisely beperformed. Thus, supply of electric power by a degree exceeding theelectric characteristics of the electric line or the load can reliablybe prevented.

The excess-current control means turns the semiconductor switchingdevice off when the excess current determining condition is satisfied.

The foregoing structure is arranged in such a manner that when theinstruction signal indicating the operation of the load is received fromthe instruction-signal output portion, the control signal is output tothe control terminal of the semiconductor switching device. In responseto the control signal, the connection between the load and the powersource is on-off controlled. When a load electric current, which flowsin the load, has been detected and the detected load electric currentsatisfies the excess current determining condition determined previouslyin accordance with the electric characteristics of the electric linebetween the load and the power source or those of the load, thesemiconductor switching device is switched off. Thus, supply of anexcess current exceeding the electric characteristics of the electricline between the load and the power source or the load can be prevented.

The excess-current control means has storage means for storing thereference electric current determined previously in accordance with theelectric characteristics and comparison means for subjecting thedetected load electric current and the reference electric current to acomparison to determine an excess current when the detected loadelectric current is larger than the reference electric current.

The above-mentioned structure is arranged in such a manner that thereference electric current determined previously in accordance with theelectric characteristics of the electric line between the load and thepower source or the load and the detected load electric current aresubjected to a comparison to determine an excess current if the loadelectric current is larger than the reference electric current. As aresult, the semiconductor switching device is switched off even in anintermittent short circuit state, which is not a complete short circuitstate. Thus, supply of an excess current exceeding the electriccharacteristics of the electric line between the load and the powersource or the load can reliably be prevented.

The storage means further stores a high-level reference electric currenthigher than the reference electric current and a predetermined set time,and the excess-current control means is further provided with countmeans for counting a lapse of time from time at which the semiconductorswitching device has been switched on by the switch control means todetermine an excess current when the load electric current is largerthan the high-level reference electric current in a state where thelapse of time is shorter than the set time and to determine an excesscurrent when the load electric current is larger than the referenceelectric current in a state where the lapse of time is longer than theset time.

The above-mentioned structure is arranged in such a manner that thelapse of time from the moment at which the semiconductor switchingdevice has been switched on is counted. When the load electric currentis larger than the high-level reference electric current, an excesscurrent is determined until predetermined set time elapses from time atwhich the semiconductor switching device has been switched on. After theset time has elapsed from the time at which the semiconductor switchingdevice has been switched on, an excess current is determined if the loadelectric current is larger than the reference electric current. Thus,even with a load, in which a rush current flows when it is turned on,the rush current is not erroneously determined to be an excess current.

The storage means further stores a low-level reference electric currentsmaller than the reference electric current and the excess-currentcontrol means further determines abnormality when the load electriccurrent is smaller than the low-level reference electric current in astate where the lapse of time is longer than the set time.

The above-mentioned structure is arranged in such a manner that adetermination to be abnormal is made when the load electric current issmaller than the low-level reference electric current after the set timehas elapsed from the moment at which the semiconductor switching devicehas been switched on. As a result, even if an abnormal state is realizedin which intermittent opening takes place, the semiconductor switchingdevice is switched off. Thus, supply of electric power in an abnormalstate can reliably be prevented.

The above and other objects and features of the present invention willbe more apparent from the following description taken in conjunctionwith the accompanying drawings.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a circuit block diagram showing a first embodiment of a switchcircuit having an excess-current detection function according to thepresent invention;

FIG. 2 is a flow chart of a procedure for detecting an excess current;

FIG. 3 is a circuit block diagram showing a second embodiment of theswitch circuit having an excess-current detection function according tothe present invention;

FIG. 4 is a timing chart showing operation examples (1) to (4);

FIG. 5 is a graph showing a lamp interruption characteristic accordingto modification (4);

FIG. 6 is a circuit block diagram showing a third embodiment of theswitch circuit having an excess-current detection function according tothe present invention;

FIG. 7 is a flow chart of a procedure for determining an excess currentaccording to the third embodiment;

FIG. 8 is a graph showing an example of an abnormal state;

FIG. 9 is a graph showing another example of the abnormal state;

FIG. 10 is a circuit block diagram showing a fourth embodiment of theswitch circuit having an excess-current detection function according tothe present invention;

FIG. 11 is a circuit block diagram showing a fifth embodiment of theswitch circuit having an excess-current detection function according tothe present invention.

DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

Now, a description will be given in more detail of preferred embodimentsof the present invention with reference to the accompanying drawings.

FIG. 1 is a circuit block diagram showing a first embodiment of a switchcircuit having an excess-current detection function according to thepresent invention.

The switch circuit 1 having an excess-current detection function forms alamp control circuit for an automobile for controlling supply ofelectric power from a battery (a power source) B to a lamp (a load) Land comprises a N-channel field-effect transistor (hereinafter called an"FET") 2, a shunt resistor (a current detection portion) 3, amicrocomputer 4, a drive circuit 5 and an A/D converter 6. The foregoingelements are integrally formed on a substrate, such as a printed circuitboard or a semiconductor board. Note that the substrate having theforegoing elements mounted thereon may be molded by synthetic resin orthe like.

The FET 2 and the shunt resistor 3 are in series connected between thebattery B and the lamp L in such a manner that the drain of the FET 2 isconnected to the positive pole of the battery B, the source of the sameis connected to the shunt resistor 3 and the gate of the same isconnected to the drive circuit 5. When the FET 2 has been turned on, anelectric current flows in the lamp L through the shunt resistor 3.

The shunt resistor 3 in a low-level resistor for converting an electriccurrent into voltage. By detecting voltages at the two ends of the shuntresistor 3, an electric current which flows in the lamp L can bedetected. The shunt resistor 3 enables the electric current toaccurately be detected and rapid change in the electric current to bedetected. The A/D converter 6 is arranged to convert an analog value ofthe two end voltages of the shunt resistor 3 into a digital value so asto supply the digital value to the microcomputer 4.

The microcomputer 4 responds to an instruction signal supplied fromoutside to control the FET 2 to be turned on or off through the drivecircuit 5 so as to control the lamp L to be turned on or off. The drivecircuit 5 comprises a charge pump for raising the voltage level of thecontrol signal supplied from the microcomputer 4 to follow the controlsignal supplied from the microcomputer 4 to apply a gate signal to theFET 2 to turn the FET 2 on or off.

The microcomputer 4 samples an electric current I_(L) which is suppliedthrough the A/D converter 6 and which flows in the lamp L at everypredetermined sampling time T_(S) (1 second in this embodiment) andsubjects the sampled electric current I_(L) to a comparison with a knownrated current value I_(R) for the lamp L. When I_(L) ≧I_(R) issatisfied, the microcomputer 4 starts counting the energizing time T.When the accumulated value of I_(L) ×T_(S) is enlarged to apredetermined value S₀, the microcomputer 4 turns the FET 2 off.

When the detected electric current I_(L) is larger than an upper limitI_(O) (>I_(R)) determined previously, the microcomputer 4 immediatelyturns the FET 2 off through the drive circuit 5. When the microcomputer4 has turned the FET 2 off because of detection of an excess current,the microcomputer 4 outputs a status signal indicating this.

FIG. 2 is a flow chart of a procedure for detecting an excess current.

When a signal to instruct the lamp L to be turned on has been supplied,the operation of this routine is commenced. Initially, a memory registerS is set to be 0 (step S100). When the sampling time T_(S) has elapsed(YES in step S110), an electric current I_(L) is sampled from the A/Dconverter 6 (step S120).

Then, whether or not I_(L) ≧I_(O) is determined (step S130). If I_(L)≧I_(O) (YES in stop S130), the FET 2 is immediately turned off (stepS140) so that the status signal is output (step S150) and this routineis ended.

If I_(L) <I_(O) (NO in step S130), whether or not I_(L) ≧I_(R) isdetermined (step S160). If I_(L) <I_(R) (NO in step S160), the operationreturns to step S110.

If I_(L) ≧I_(R) in step S160 (YES in step S160), the product of theelectric current I_(L) and the energizing time T_(S) is, in the form ofS=S+I_(L) ×T_(S), accumulated in the memory register S (step S170).Then, whether or not S≧S₀ is determined (step S180).

If S≧S₀ (YES in step S180), the operation proceeds to step S140. If S<S₀(NO in step S180), whether or not an instruction signal to turn the lampL off has been supplied is determined (step S190). If the instructionsignal for turning off the same has been supplied (YES in step S190),the foregoing routine is ended.

If the instruction signal for turning the lamp L off has not been issued(NO in step S190), the operation returns to step S110 so that theforegoing operation is repeated at every Sampling time T_(S).

As described above, the FET 2 is turned off to interrupt supply ofelectric power to the lamp L when the accumulated value of the productI_(L) ×T_(S) with the energizing time T_(S) has reached thepredetermined value S₀ in a state where an excess current I_(L) largerthan the rated electric current I_(R) flows. Therefore, when the levelof the excess current I_(L) is low, supply of electric power to the lampL is interrupted after electric power has been supplied for a relativelylong time. If the level of the excess current I_(L) is high, supply ofelectric power to the lamp L is interrupted after electric power hasbeen supplied for a short time. As a result, supply interruption controlcan be performed to be adaptable to the level of the excess current.Moreover, when an excess current flows, the supply interruption controlcan be performed to be adaptable to the current resistancecharacteristic of the lamp L.

FIG. 3 is a circuit block diagram showing a second embodiment of theswitch circuit having an excess-current detection function according tothe present invention. The same elements an those according to the firstembodiment are given the same reference numerals and the same elementsare omitted from description.

In the second embodiment, the switch circuit 1 having an excess-currentdetection function is provided with a hall sensor (the current detectionportion) 30 as an alternative to the shunt resistor 3. Moreover, aninterface (I/F) circuit 40, a current monitoring portion 41, an OR gatecircuit 42 and an FET 43 are provided as an alternative to themicrocomputer 4. Similarly to the first embodiment, the foregoingelements are integrally fomed on a printed circuit substrate or asemiconductor substrate. Note that the rated current I_(R) for the lampL is 5 A.

The hall sensor 30 comprises a semiconductor device arranged to use ahall effect which outputs voltage V which is in proportion to theproduct I×B of electric current I which flows in the semiconductordevice and the magnetic flux density B when the semiconductor device isplaced in a magnetic field having the magnetic flux density B. Inaccordance with the level of the output voltage V, the electric currentI_(L) which flows in the lamp L can be detected The hall sensor 30enables the electric current to accurately be detected though the sizeof the apparatus is very small.

The I/F circuit 40 receives an instruction signal supplied from outsideto instruct the lamp L to be turned on or off and controls the FET 2 toturn on or off through the drive circuit 5 in accordance with theinstruction signal so as to control the lamp L to be turned on or off.

The current monitoring portion 41 has first to fifth monitoring circuits411 to 415 each comprising a comparator and an on-delay timer and havingan output connected to the input of the OR gate circuit 42. The outputof the OR gate circuit 42 is connected to the gate of the FET 43, thedrain of the FET 43 is connected to the gate of the FET 2, and thesource of the FET 43 is connected to an earth line.

The first to fifth monitoring circuits 411 to 415 are arranged to samplethe electric current I_(L) supplied through the A/D converter 6 at everypredetermined sampling time T_(S) (1 second in this embodiment) tooutput high level signals in accordance with the level of the electriccurrent. When an electric current I_(L) larger than 100 A has beensupplied, the first monitoring circuit 411 starts the operation thereofso as to immediately output the high level signal.

The second monitoring circuit 412 starts the operation thereof when anelectric current I_(L) larger than 70 A is supplied thereto. If thesupply of the foregoing electric current is continued for 5 seconds, thesecond monitoring circuit 412 outputs a high-level signal. The thirdmonitoring circuit 413 starts the operation thereof when an electriccurrent I_(L) larger than 30 A is supplied thereto. If the supply of theforegoing electric current is continued for 10 seconds, the thirdmonitoring circuit 413 outputs a high-level signal. The fourthmonitoring circuit 414 starts the operation thereof when an electriccurrent I_(L) larger than 10 A is supplied thereto. If the supply of theforegoing electric current is continued for 30 seconds, the fourthmonitoring circuit 414 outputs a high-level signal. The fifth monitoringcircuit 415 starts the operation thereof when an electric current I_(L)larger than 5 A is supplied thereto. If the supply of the foregoingelectric current is continued for 60 seconds, the fifth monitoringcircuit 415 outputs a high-level signal.

If the high-level signal is output from at least one of the first tofifth monitoring circuits 411 to 415, a high-level signal is output fromthe OR gate circuit 42 to the gate of the FET 43. As a result, the FET43 is turned on so that the gate potential of the FET 2 is lowered tocause the FET 2 to be turned off. Thus, supply of electric power to thelamp L is interrupted.

The following Table 1 shown conditions under which the lamp L isinterrupted by the current monitoring portion 41. As shown in Table 1,each of the first to fifth monitoring circuits 411 to 415 interruptssupply of electric power to the lamp L in accordance with the level ofthe electric current I_(L) which flows in the lamp L.

                  TABLE 1                                                         ______________________________________                                        DETECTED                                                                      ELECTRIC                                                                      CURRENT       ENERGIZING TIME TO                                              I.sub.L (A)   INTERRUPTION                                                    ______________________________________                                        100 ≦                                                                            I.sub.L Immediately                                                 70 ≦                                                                             I.sub.L < 100                                                                          5 seconds                                                  30 ≦                                                                             I.sub.L < 70                                                                          10 seconds                                                  10 ≦                                                                             I.sub.L < 30                                                                          30 seconds                                                  5 ≦                                                                              I.sub.L < 10                                                                          60 seconds                                                  ______________________________________                                    

With reference to a timing chart shown in FIG. 4, operation examples (1)to (4) will now be described.

(1) When a 15 A electric current I_(L) has been detected at time t₁₁,the fourth monitoring circuit 414 and the fifth monitoring circuit 415start the operations thereof. If an electric current I_(L) of 10 A orlarger and smaller than 30 A flows for 30 seconds, a high-level signalis transmitted from the fourth monitoring circuit 414 to the OR gatecircuit 42 at time t₁₂. Therefore, a high-level signal is transmittedfrom the OR gate circuit 42 to the gate of the FET 43. As a result, theFET 43 is electrically conducted, thus causing the gate potential of theFET 2 to be lowered. Thus, the FET 2 is turned off so that supply ofelectric power to the lamp L is interrupted.

(2) When the detected electric current I_(L) has been enlarged to 15 Aat time t₁₂, the fourth monitoring circuit 414 and the fifth monitoringcircuit 415 start the operations thereof. When the detected electriccurrent I_(L) has been made to be smaller than 10 A (not smaller than 5A) at time t₂₂ which is shorter than 30 seconds from time t₂₁, theoperation of the fourth monitoring circuit 414 is interrupted and theoperation of the fifth monitoring circuit 415 is continued. If anelectric current I_(L) not smaller than 5 A flows for 60 seconds fromtime t₂₁, the high-level signal is transmitted from the fifth monitoringcircuit 415 to the OR gate circuit 42 at time t₂₂. Therefore, thehigh-level signal is output from the OR gate circuit 42 to the gate ofthe FET 43. As a result, the FET 43 is electrically conducted so thatthe gate potential of the FET 2 is lowered and the FET 2 is turned off.Thus, supply of electric power to the lamp L is interrupted.

(3) When an electric current I_(L) of 10 A or larger and smaller than 30A starts flowing at time t₃₁, the fourth monitoring circuit 414 and thefifth monitoring circuit 415 start the operations thereof. When thedetected electric current I_(L) has been made to be 85 A at time t₃₂which is shorter than 30 seconds from time t₃₁, the second monitoringcircuit 412 and the third monitoring circuit 413 start the operationsthereof. If a state is realized in which the detected electric currentI_(L) is 70 A or larger and smaller than 100 A for 5 seconds from timet₃₂, the second monitoring circuit 412 transmits a high-level signal tothe OR gate circuit 42. An a result, the FET 43 is electricallyconducted so that the gate potential of the FET 2 is lowered. Thus, theFET 2 is turned off and supply of electric power to the lamp L isinterrupted.

(4) When a 50 A electric current I_(L) starts flowing at time t₄₁, thethird monitoring circuit 413 to the fifth monitoring circuit 415 startthe operations thereof. If the detected electric current I_(L) exceeds100 A at time t₄₂ which is shorter than 10 seconds from time t₄₁, ahigh-level signal is immediately transmitted from the first monitoringcircuit 411 to the OR gate circuit 42. As a result, the FET 43 iselectrically conducted so that the gate potential of the FET 2 islowered. As a result, the supply of electric power to the lamp L isinterrupted.

When a determination is made that the detected electric current I_(L)which flows in the lamp L is an excess current, the FET 2 is turned offas described above. Therefore, supply of electric power to the lamp Lcan automatically be interrupted. Since the level of the electriccurrent I_(L) is detected and the FET 2 is arranged to be turned off ina short energizing time as the level of the excess current is raised,supply of electric power exceeding the current resistance for the lamp Lcan reliably be interrupted.

The present invention is not limited to the first and secondembodiments. The following modifications (1) to (10) may be employed.

(1) The structure of the first embodiment may be arranged in such amanner that an input portion 7 comprising a dip switch and the like asindicated by an alternate long and short dash line shown in FIG. 1 isprovided to permit the microcomputer 4 to arbitrarily set rated currentvalue I_(R), set values S₀ and _(O) and the like in response to input tothe input portion 7.

(2) As compared with the first embodiment in which the FET 2 is turnedoff when an excess current has been detected, a PWM control signalhaving a predetermined duty ratio may be output from the microcomputer 4to the drive circuit 5 to turn the FET 2 on or off with a predeterminedswitching frequency so as to reduce the electric current to be suppliedto the lamp L. Note that a preferred switching frequency of the PWMcontrol signal is 100 Hz or higher. By using the FET 2 to serve as theswitching device, the FET 2 can reliably be turned on and off.

(3) In the first and second embodiments, the N-channel field effecttransistor is employed to serve as the semiconductor switching device. Abipolar transistor, a P-channel FET or an insulation gate type bipolartransistor (IGBT), may be employed. Also in this case, the electriccurrent to be supplied to the lamp L can be reduced by turning thetransistor on or off by using the PWM control signal similarly to themodification (2).

(4) In the second embodiment, the current monitoring portion 41 has fivecurrent monitoring circuits, the number of the current monitoringcircuits may be reduced. The number of the current monitoring circuitsmay be enlarged to enlarge the number of combinations of the currentlevels, to be determined, and energizing time periods taken to theinterruption so as to oat interruption characteristic S, as shown inFIG. 5.

FIG. 5 shows the interruption characteristic S of the lamp L accordingto the modification (4), in which fusing characteristic R indicating anelectric current level which causes the load or the electric-lineelements to fuse is additionally shown. Moreover, fuse meltingcharacteristic F is shown as a comparative example. Note that the ratedelectric current for the lamp L is I_(R).

In the case shown in FIG. 5, when detected electric current I_(L)satisfies I₁ ≦I_(L), supply of electric power is immediatelyinterrupted. When I₂ ≦I_(L) <I₁ is satisfied, interruption is performedat energizing time T₁. When I_(R) ≦I_(L) <I₃, interruption is performedat energizing time T₂.

When the interruption characteristic S for the lamp L is set as shown inFIG. 5, approach to the fusing characteristic R of the load and theelectric-line elements can be realized as compared with the meltingcharacteristic F of the fuse. That is, the rated electric current forthe electric-line elements can be lowered to the electric current levelwhich is actually supplied. Thus, the diameter of the electric lines foruse in the electric-line elements can be reduced. As a result, theweight and cost of the elements can be reduced.

(5) The structures according to the first embodiment or the secondembodiment may be arranged in such a manner that notification means,having a display portion comprising an LCD panel or the like fornotifying a user of interruption of supply of electric powerattributable to an excess current in response to a status signal outputfrom the switch circuit 1 having an excess-current detection function tothe outside, may be attached to a position on the outside of the switchcircuit 1 having an excess-current detection function. As a result,interruption of supply of an electric current attributable to an excesscurrent can reliably be communicated to the user.

(6) The structure according to the first embodiment or the secondembodiment may be arranged in such a manner that the current detectionportion may be composed of a resistor in series connected between theFET 2 and the lamp L and a temperature sensor for detecting thetemperature of the resistor as an alternative to the shunt resistor 3and the hall sensor 30. In the foregoing case, the microcomputer 4 isarranged to monitor change in the electric current by detecting changein the temperature of the resistor so that a similar effect is obtainedwith a simple structure.

(7) The current detection portion may be formed by using adirect-current transformer method in which two coils wound in theopposite directions are disposed through which an electric lineconnected from the battery B to the lamp L and which must be measuredpasses. Moreover, an alternating-current power source for applyingalternating-current voltage to one of the coils is provided. Inaddition, a detection portion is provided which detects an alternatingcurrent induced by the other coil when the alternating-current voltagehas been applied. Since the alternating current is in proportion to theelectric current which flows through the electric line which must bemeasured, the electric current which flows in the lamp L can bedetected.

As a result, the current detection portion can be insulated from theelectric line which must be measured. When the winding ratio of the coilis adjusted, the output level can be raised to a required level. In theforegoing case, a portion or the overall body of the current detectionportion may be disposed on the outside of the substrate on which theelements are mounted.

(8) The current detection portion may be formed by using thealternating-current transformer method. The foregoing method is arrangedin such a manner that an electric line, which establishes the connectionbetween the battery B and the lamp L and which must be measured, isdisposed to penetrate the coil or magnetically coupled with the coil.Moreover, a detection portion is provided so that an alternating currentwhich is induced by the coil attributable to change in the electriccurrent, such as a rush current into the lamp L, is detected. Since thedifferential waveform of the rush current into the lamp L is detected inthe above-mentioned case, provision of a current monitoring portion foridentifying the level of the excess current in accordance with thechange ratio of the waveform of the electric current enables the excesscurrent to be determined.

(9) The first and the second embodiments may be arranged in such amanner that an excess-voltage detection portion and a temperaturedetection portion integrally formed on the substrate of the switchcircuit 1 having an excess-current detection function may be provided.The excess voltage detection portion is connected to a power supply lineextending from the battery B to detect whether or not excess voltageexists. The temperature detection portion comprises a thermistor todetect the environmental temperature so as to detect whether or notoverheating has taken place.

(10) Although the first and second embodiments have been described whichhas the structure in which the structure of the present invention isapplied to a switch circuit for controlling the lamp which is the load,the present invention may be applied to a switch circuit for controllinga load, such as a motor without the lamp to turn the load on and off.

A third embodiment of the present invention will now be described. FIG.6 is a circuit block diagram showing a third embodiment of the switchcircuit having an excess-current detection function according to thepresent invention.

A switch circuit 11 having an excess-current detection function forms alamp control circuit for controlling supply of electric power from abattery (a power source) B of an automobile to a lamp (a load) L andcomprises an FET 12, a shunt resistor (a current detection portion) 13,a microcomputer 14, a drive circuit 15 and an A/D converter 16.

The FET 12 and the shunt resistor 13 are in series connected between thebattery B and the lamp L in such a manner that the drain of the FET 12is connected to the positive pole of the battery B, the source of thesame is connected to an end of the shunt resistor 13, the gate isconnected to an output terminal of the microcomputer 14 through thedrive circuit 15 and another end of the shunt resistor 13 is groundedthrough an electric line W and the lamp L. As a result of theabove-mentioned structure, when the FET 12 has been turned on, electricpower is supplied from the battery B to the lamp L through the shuntresistor 13 and the electric line W.

The shunt resistor 13 is a low-level resistor for converting an electriccurrent into voltage. By detecting the voltages at the two ends of theshunt resistor 13, a load electric current I_(L) which flows in the lampL can be detected. The shunt resistor 13 enables an electric current toaccurately be detected and rapid change in the electric current to bedetected. When the shunt resistor 13 has a low degree of temperaturedependency, the current detection accuracy with respect to change in theatmospheric temperature can be improved.

The A/D converter 16 is arranged to convert an analog value of thetwo-end voltage of the shunt resistor 13 into a digital value so as tosupply the digital value to the microcomputer 14. The drive circuit 15comprises a charge pump for raising the voltage level of a controlsignal supplied from the microcomputer 14 to supply a gate signal to theFET 12 in accordance with the control signal supplied from themicrocomputer 14 to turn the FET 12 on or off.

The microcomputer 14 includes a ROM 14a and a RAM 14b so as to controlthe operation of the lamp control circuit. The RAM 14b temporarilystores data, while the ROM 14a stores predetermined set values, such asset time T₁ and reference electric currents I₁, I₂ and I₃ and a controlprogram.

The set time T1 is determined in consideration of a duration of a rushcurrent which flows when the lamp L has been turned on. The referenceelectric current I₁, and I₂ (I₁ >I₂) are determined in consideration ofthe current resistance characteristic (for example, the fusingcharacteristic of the coating for the electric wire) of the electricline W, while the reference electric current I₃ is determined to be avalue required to satisfy 0<I₃ <I₂.

The microcomputer 14 has the following functions (A) to (F).

(A) In response to an instruction signal supplied from outside andarranged to turn the lamp L on or off, the microcomputer 14 controls theFET 12 through the drive circuit 15 to turn the FET 12 on or off so asto control the operation of the lamp L.

(B) The microcomputer 14 has a function to serve as a time measuringmeans for counting time lapse T from time at which the FET 12 has beenswitched on.

(C) The microcomputer 14 samples a value supplied from the A/D converter16 at every predetermined sampling time T_(S) (100 msec in thisembodiment) to detect a load electric current I_(L) which flows in thelamp L.

(D) The microcomputer 14 has functions to serve as comparison means forsubjecting the detected load electric current I_(L) and referenceelectric currents I₁, I₂ and I₃ stored in the 14a to a comparison andexcess-current determining means for determining whether or not theelectric current is an excess current in accordance with a result of thecomparison.

In the foregoing case, when time lapse T is shorter than set time T₁,the load electric current I_(L) is subjected to a comparison with thereference electric current I₁. If I_(L) ≧I₁ is satisfied, the electriccurrent is determined to be an excess current.

If the time lapse T is set time T₁ or longer, comparison with thereference electric currents I₂ and I₃ is performed. If I_(L) ≧I₂, theelectric current is determined to be an excess current. If I_(L) ≦I₃,the electric current is determined to be an excess current.

If I_(L) ≦I₃, the electric current is not necessarily an excess current.In this case, the load electric current is determined to be in anabnormal state because it has been lowered from a steady level to alevel not higher than the reference electric current I₃.

(E) The microcomputer 14 has a function to serve as excess-currentcontrol means for turning the FET 12 off through the drive circuit 15when it has determined the electric current is an excess current or thatthe same is in an abnormal state.

(F) When the FET 12 has been turned off because of a determination madesuch that the electric current is an excess current or the same is in anabnormal state, the microcomputer 14 outputs a status signal indicatingthis.

Referring to FIGS. 7 to 9, the operation of the third embodiment willnow be described. FIG. 7 is a flow chart of a procedure for determiningan excess current employed in the third embodiment. FIGS. 8 and 9 arediagrams respectively showing examples of the abnornal rate.

When the FET 12 has been turned on in response to a signal instructingthe lamp L to be turned on and thus the lamp L has been turned on, theroutine according to this embodiment is commenced. Thus, counting oftime lapse T is commenced (step S200). Then, whether or not the set timeT₁ has elapsed is determined (step S210). If the time has not elapsed(YES in step S210), the load electric current I_(L) is sampled from theA/D converter 16 (step S220).

Then, the sampled load electric current I_(L) is subjected to acomparison with the reference electric current I₁ to determine whetheror not the load electric current I_(L) is smaller than the referenceelectric current I₁ (step S230). If I_(L) <I₁ (YES in step S230), theoperation returns to step S210. If I_(L) ≧I₁ (NO in step S230), the loadelectric current is determined to be an excess current. Thus, the FET 12is turned off (step S240) and a status signal 18 output (step S250).Then, the foregoing routine is ended.

If T≧T₁ in step S210, that is, if the set time T₁ has elapsed from timeat which the lamp L has been turned on (NO in step S210), counting ofthe time lapse T is interrupted (step S260). Then, the load electriccurrent I_(L) is sampled (step S270) so that the sampled load electriccurrent I_(L) is subjected to a comparison with the reference electriccurrents I₂ and I₃ to compare their levels (step S280). If I₃ <I_(L) <I₂(YES in step S280), the operation returns to step S270.

If I_(L) ≧I₂ or I_(L) ≦I₃ in step S280 (NO in step S280), adetermination is made that the electric current is an excess current orin an abnormal state and the operation proceeds to step S240.

If an abnormal state as shown in FIG. 8 has been determined by theabove-mentioned procedure, the FET 12 is turned off at time t₁ at whichthe load electric current I_(L) is larger than the reference electriccurrent I₂ after set time T₁ has elapsed from time at which the FET 12has been turned on so that supply of electric power to the lamp L isinterrupted.

If a fuse having a malting characterintic indicated by a two-dot chainline as shown in the drawing is provided in an abnormal case in whichshort circuit states are intermittently realized in place of a completeshort circuit, the fuse is not melted because rise in the temperaturetakes place slowly and thus supply of electric power cannot beinterrupted. However, the above-mentioned third embodiment is able toreliably interrupt supply of electric power. As a result, there is notapprehension of arc discharge occurring in the abnormal portion so thatthe electric line W and the lamp L are reliably protected.

If an abnormal state as shown in FIG. 9 takes place, the is FET 12 isturned off at time t₂ at which the load electric current I_(L) is thereference electric current I₃ or lower after time lapse T₁ from time atwhich the FET 12 has been turned on. Thus, supply of electric power tothe lamp L is interrupted.

If an abnormal state is realized in which an opened state is realizedintermittently, the fuse is not melted because the electric current isnot an excess eurrent. Therefore, supply of electric power cannot beinterrupted. However, the third embodiment arranged to determineoccurrence of an abnormal state is able to interrupt supply of electricpower. As a result, the apprehension of arc discharge or the likeoccurring in the abnormal portion can be eliminated. Thus, the electricline W and the lamp L can reliably be protected.

An alternate long and short dash line shown in FIGS. 8 and 9 and drawnfrom time t₁ and t₂ indicate abnormal states in a case where electricpower is not supplied to the lamp L because of the structure accordingto this embodiment.

FIG. 10 is a circuit block diagram showing a fourth embodiment of theswitch circuit having an excess-current detection function according tothe present invention. The same elements as those according to the thirdembodiment are given the same reference numerals and the same elementsare omitted from description.

The fourth embodiment is arranged in such a manner that a hall sensor (acurrent detection portion) 30 is provided as an iS alternative to theshunt resistor 13 according to the third embodiment.

The hall sensor 30 uses a hall effect which outputs voltage V which isin proportion to the product I×B of the magnetic flux density B of amagnetic field and electric current I which flows in the semiconductordevice when the semiconductor device is placed in a magnetic fieldhaving the magnetic flux density B. In accordance with the knownelectric current I which is determined by the voltage of the battery andthe output voltage V which is detected by the microcomputer 14, themagnetic flux density B can be obtained. Thus, load electric currentI_(L) which is in proportion to the magnetic flux density B can beobtained. The hall sensor 30 enables the load electric current I_(L) toaccurately be detected though the size of the apparatus ia very small.

The fourth embodiment, having the structure that the microcomputer 14has a function similar to that of the third embodiment, attains asimilar effect.

FIG. 11 is a circuit block diagram showing a fifth embodiment of theswitch circuit having an excess-current detection function according tothe present invention. The same elements as those according to the thirdembodiment are given the same reference numerals and the same elementsare omitted from description.

The fifth embodiment is arranged to comprise an FET 17, a comparator 18,a constant-current circuit 19 and a reference resistor Rref in place ofthe shunt resistor 13 and the A/D converter 16 according to the thirdembodiment, the FET 12 being directly connected to the lamp L throughthe electric line W.

The drain of the FET 17 is connected to the positive terminal of thebattery B, the gate of the same is connected to the gate of the FET 12and the source is connected to the input side of the constant-currentcircuit 19 and connected to input terminal P of the comparator 18.

Another input terminal Q of the comparator 18 is connected to the sourceof the FET 12, while the output terminal is connected to an inputterminal of the microcomputer 14. The comparator 18 subjects inputvoltages V_(P) and V_(Q) to the input terminals P and Q to a comparison.When V_(P) ≧V_(Q), the comparator 18 outputs a low-level signal andoutputs a high-level signal when V_(P) <V_(Q). The output side of theconstant-current circuit 19 is grounded through the reference resistorRref.

Assuming that the on-resistance of the FET 12 and 17 are R_(DS)(on)12and R_(DS)(on)17 respectively, the employed FET 17 satisfiesR_(DS)(on)12 <R_(DS)(on)17. The foregoing requirement can be met byemploying an FET having cells by the number smaller than the cells ofthe FET 12. The difference in the on-resistance, a large electriccurrent can be supplied to the FET 12, that is, the lamp L as comparedwith the FET 17.

The foregoing circuit causes a predetermined electric current to besupplied to the reference resistance Rref by the constant-currentcircuit 19. Therefore, the voltage V_(P) has a constant value.Therefore, when the load electric current I_(L) satisfies I_(L) =I₂, thevalue V_(Q2) of the voltage V_(Q) is caused to satisfy V_(Q2) =V_(P) bysetting the resistance value of the reference resistor Rref.

When a high-level signal has been supplied from the comparator 18 to themicrocomputer 14 because V_(P) <V_(Q) has been satisfied, themicrocomputer 14 determines that the load current is an excess current.

The fifth embodiment is arranged in such a manner that the load electriccurrent I_(L) is not directly detected. As an alternative to this, thetwo-end voltage V_(Q) of the lamp L in employed. Therefore, when thecharacteristics of the lamp L satisfy V_(P) <V_(Q) during passage of therush current, the microcomputer 14 does not determine the level of theinput signal from the comparator 18 until the set time T₁ elapses. Thedetermination may be commenced after the set time T₁ has elapsed.

The reason why a rush current flows lies in that the resistance value ofthe lamp L is low. Therefore, when V_(P) <V_(Q) cannot be satisfieduntil the set time T₁ elapses attributable to the characteristics of thelamp L, the microcomputer 14 does not count the time lapse T and mayalways determine the level of the input signal from the comparator 18.

The fifth embodiment structured in such a manner that the two-endvoltage V_(Q) of the lamp L is subject to a comparison with thepredetermined voltage V_(P) to make a comparison between the loadcurrent I_(L) and the reference electric current I₂ so as to determinethat the electric current is an excess current when V_(P) <V_(Q). Thus,an effect similar to that obtainable from the third embodiment can beattained even if an abnormal state as shown in FIG. 8 takes place.

The present invention is not limited to the third to fifth embodiments.The following modifications (11) to (14) may be employed.

(11) The structure according to the third embodiment or the fourthembodiment may be arranged in such a manner that an input portion 21comprising a dip switch is provided as 25 indicated by an alternate longand short dash line shown in FIGS. 6 and 10 and the microcomputer 14 ispermitted to arbitrarily determine the values of reference electriccurrents I₁, I₂ and I₃ in accordance with the input to the input portion21.

(12) Although the third to fifth embodiments have the structure in whichthe N-channel field-effect transistor to serve as the semiconductorswitching device, a bipolar transistor, a P-channel FET or an insulationgate type bipolar transistor (IGBT), may be employed.

(13) The third to fifth embodiments may be arranged in such a mannerthat notifying means comprising an LCD panel or the like forcommunicating interruption of supply of electric power attributable toan excess current to a user in accordance with a status signal outputfrom the switch circuit 11 having an excess-current detection functionto the outside is attached to is an appropriate position on the outsideof the switch circuit 11 having an excess-current detection function. Asa result, interruption of supply of electric power attributable to anexcess current can reliably be notified to a user.

(14) Although the third to fifth embodiments have been described to havea structure in which the present invention is applied to the switchcircuit for controlling the lamp L which in the load, the presentinvention is not limited to this. The present invention may be appliedto a load having a large rush current, such as a motor or alarge-capacity capacitor.

The load may be a load which does not generate any rush current. In thiscase, counting of the lapse time T and comparison of the referenceelectric current I₁ and the load electric current I_(L) are notrequired.

As described above, the present invention has the structure that a loadelectric current which flows in a load is detected. If the detected loadelectric current satisfied the excess current determining conditiondetermined previously in accordance with the electric characteristics ofthe electric line between the load and the power source or those of theload, on-off control of the semiconductor switching device is changed.Therefore, supply of electric power exceeding the electriccharacteristics of the electric line or the load can be prevented. As aresult, the electric line and the load can be protected from the excesscurrent.

Since the semiconductor switching device, the switch control means andthe excess-current control means are integrally formed on a substrate,the size of the circuit can be reduced and the electrical wiring can besimplified.

Since the electric-current detection means is furthermore integrallyformed on the substrate, the size reduction and simplification of theelectrical wiring can furthermore be enhanced.

The energizing timer in which a load electric current higher than areference electric current level flows and the load electric current areused to set the excess current determining condition so that a problemin that the energizing time of the excess current exceeds the electriccharacteristics of the electric line and those of the load is reliablyprevented. As a result, the electric lines and the load can reliably beprotected.

A load electric current, which flows in the load, is detected, and thedetected load electric current, a reference electric current and aplurality of set electric currents are subject to a comparison. Aplurality of excess current determining conditions arranged in such amanner that the set time is made to be short as the set electric currentis high are used to determine an excess current. Thus, the determinationof the excess current can precisely be performed. As a result, supply ofelectric power exceeding the electric characteristics of the electricline or those of the load can reliably be prevented.

A load electric current, which flows in the load, is detected. If thedetected load electric current satisfies a excess current determiningcondition determined previously in accordance with the electriccharacteristics of the electric line between the load and the powersource or those of the load, the semiconductor switching device isswitched off. Thus, supply of an excess current larger than the electriccharacteristics of the electric line between the load and the powersource or those of the load can be prevented.

The reference electric current determined previously in accordance withthe electric characteristics of the electric line between the load andthe power source or those of the load and the detected load electriccurrent are subjected to a comparison. Then, a determination isperformed that the electric current is an excess current when the loadelectric current is larger than the reference electric current. Thus, inan intermittent short circuit state which is not a complete shortcircuit state, the semiconductor switching device is switched off toreliably prevent supply of an electric current larger than the electriccharacteristics of the electric line between the load and the powersource or those of the load.

The lapse of time from the time at which the semiconductor switchingdevice has been switched on is counted. When the load electric currentis larger than the high-level reference electric current, the current isdetermined to be an excess current after a predetermined set timeelapses from the time at which the semiconductor switching device hasbeen switched on. After the set time has elapsed from the time at whichthe semiconductor switching device has been switched on, a determinationis made that the current is an excess current if the load electriccurrent is larger than the reference electric current. As a result, evenwith a load, in which a rush current flows when it is turned on, therush current is not erroneously determined to be an excess current.

After the set time has elapsed from the time at which the semiconductorswitching device has been switched on, a determination is performed thatthe load electric current is abnormal even if the load electric currentis smaller than the low-level reference electric current. Therefore,even if an abnormal state is realized in which intermittent openingtakes place, the semiconductor switching device is switched off. Thus,supply of electric power in an abnormal state can reliably be prevented.

The foregoing description of the preferred embodiments of the inventionhas been presented for purposes of illustration and description. It isnot intended to be exhaustive or to limit the invention to the preciseform disclosed, and modifications and variations are possible in lightof the above teachings or may be acquired from practice of theinvention. The embodiments were chosen and described in order to explainthe principles of the invention and its practical application to enableone skilled in the art to utilize the invention in various embodimentsand with various modifications as are suited to the particular usecontemplated. It is intended that the scope of the invention be definedby the claims appended hereto, and their equivalents.

What is claimed is:
 1. A switch circuit having an excess-currentdetection function, comprising:a semiconductor switching device disposedbetween a load and a power source and arranged to turn on or off theconnection between said load and said power source in accordance with acontrol signal supplied to a control terminal thereof; switch controlmeans arranged to receive an instruction signal output from aninstruction-signal output portion and to output the control signal tosaid control terminal of said semiconductor switching device so as tocontrol supply of electric power from said power source to said load;electric-current detection means for detecting a load electric currentwhich flows in said load; excess-current control means for changingon/off control of said semiconductor switching device when detection ofsaid load electric current satisfies at least one of a plurality of anexcess current determining conditions previously determined inaccordance with the electric characteristics of an electric line betweensaid load and said power source, or electric characteristics of saidload; and an A/D converter connected with said electric-currentdetection means for converting the detected load electric current froman analog value to a digital value,wherein said excess-current controlmeans has comparison means for subjecting said digital value of saiddetected load electric current and a reference electric currentdetermined previously in accordance with the electric characteristics toa comparison, to determine an excess current, said excess current beinga load electric current that is greater than said reference electriccurrent and count means for counting energizing time in which saidexcess current flows in said load, and said excess current determiningcondition is determined by using said excess current and said energizingtime; and wherein said excess-current control means is arranged todetermine the excess current when a condition is satisfied such that apredetermined electric current larger than said reference electriccurrent flows in said load for time determined previously in accordancewith said electric characteristics and provided with said plurality ofexcess current determining conditions obtained by combining differentset electric currents and set time periods arranged in such a mannerthat the set time is shortened in inverse proportion to the set electriccurrent, said comparison means further subjects said digital value ofsaid detected load electric current and each of said set electriccurrents to a comparison, and said count means further counts energizingtime in which an electric current larger than each of said set electriccurrents flow in said load.
 2. A switch circuit having an excess-currentdetection function according to claim 1, wherein said semiconductorswitching device, said switch control means and said excess-currentcontrol means are integrally formed on a substrate.
 3. A switch circuithaving an excess-current detection function according to claim 2,wherein said electric-current detection means is furthermore integrallyformed on said substrate.
 4. A switch circuit having an excess-currentdetection function according to claim 1, wherein a storage meansincluded in the excess-current control means stores a high-levelreference electric current higher than said reference electric currentand a predetermined set time, and said excess-current control means isfurther provided with count means for counting a lapse of time from timeat which said semiconductor switching device has been switched on bysaid switch control means to determine an excess current when saiddigital value of said detected load electric current is larger than saidhigh-level reference electric current in a state where said lapse oftime is shorter then said set time and to determine an excess currentwhen said digital value of said detected load electric current is largerthan said reference electric current in a state where said lapse of timeis longer than said set time.
 5. A switch circuit having anexcess-current detection function according to claim 4, wherein saidstorage means further stores a low-level reference electric currentsmaller than said reference electric current and said excess-currentcontrol means further determines abnormality when said digital value ofdetected load electric current is smaller than said low-level referenceelectric current in a state where said lapse of time is longer than saidset time.
 6. A switch circuit having an excess-current detectionfunction, comprising:a semiconductor switching device disposed between aload and a power source and arranged to turn on or off the connectionbetween said load and said power source in accordance with a controlsignal supplied to a control terminal thereof; switch control meansarranged to receive an instruction signal output from aninstruction-signal output portion and to output the control signal tosaid control terminal of said semiconductor switching device so as tocontrol supply of electric power from said power source to said load;electric-current detection means for detecting a load electric currentwhich flows in said load; excess-current control means for changingon/off control of said semiconductor switching device when detection ofsaid load electric current satisfies an excess current determiningcondition previously determined in accordance with the electriccharacteristics of an electric line between said load and said powersource, or electric characteristics of said load; and an A/D converterwhich converts the detected load electric current from an analog valueto a digital value so as to supply said digital value to saidexcess-current control means,wherein said excess-current control meansturns said semiconductor switching device off when said excess currentdetermining condition is satisfied, wherein said excess-current controlmeans includes storage means for storing a reference electric currentdetermined previously in accordance with the electric characteristics,and comparison means for subjecting said digital value of said detectedload electric current and said reference electric current to acomparison to determine an excess current when said digital value ofsaid detected load electric current is larger than said referenceelectric current, and wherein said storage means further stores ahigh-level reference electric current higher than said referenceelectric current and a predetermined set time, and said excess-currentcontrol means is further provided with count means for counting a lapseof time from time at which said semiconductor switching device has beenswitched on by said switch control means to determine an excess currentwhen said digital value of said detected load electric current is largerthan said high-level reference electric current in a state where saidlapse of time is shorter than said set time and to determine an excesscurrent when said digital value of said detected load electric currentis larger than said reference electric current in a state where saidlapse of time is longer than said set time.